import request from '@/http/request.ts';

const BaseURL = '/instance'

export function instanceCreate(data:FormData){
    return request({
        url: BaseURL+'/create',
        method: 'post',
        data
    })
}

export function instanceUpdate(data:FormData){
    return request({
        url: BaseURL+'/update',
        method: 'post',
        data
    })
}

export function instanceRead(params:Object){
    return request({
        url: BaseURL+'/read',
        method: 'get',
        params
    })
}

export function instanceDelete(data:FormData){
    return request({
        url: BaseURL+'/delete',
        method: 'post',
        data
    })
}

export function calculateUpgrade(data:FormData){
    return request({
        url: BaseURL+'/calculateUpgrade',
        method: 'post',
        data
    })
}

export function calculateRenew(data:FormData){
    return request({
        url: BaseURL+'/calculateRenew',
        method: 'post',
        data
    })
}

export function upgrade(data:FormData){
    return request({
        url: BaseURL+'/upgrade',
        method: 'post',
        data
    })
}

export function renew(data:FormData){
    return request({
        url: BaseURL+'/renew',
        method: 'post',
        data
    })
}

